CMAKE_MINIMUM_REQUIRED(VERSION 2.8)

PROJECT(TSIN)

SET(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS ON)
SET(CMAKE_USE_RELATIVE_PATHS TRUE)

SET(COMPONENT_TSIN TRUE CACHE BOOL "Build TSIN engine.")
SET(COMPONENT_SCDL_COMPILER TRUE CACHE BOOL "Build SCDL compiler.")
SET(COMPONENT_TSIN_IDE TRUE CACHE BOOL "Build TSIN-IDE.")
SET(TSIN_ENABLE_MEM_CHECK FALSE CACHE BOOL "Enable dynamic memory check.")
SET(CMAKE_INSTALL_PREFIX "${PROJECT_SOURCE_DIR}/install")

IF(WIN32)
SET(RUNTIME_DIR tsin.exe.local)
SET(EXECUTABLE_ATTR WIN32)
ELSE()
SET(RUNTIME_DIR tsin.local)
SET(EXECUTABLE_ATTR )
ENDIF()
SET(LIBRARY_DIR lib)

ENABLE_TESTING()

ADD_SUBDIRECTORY(src)
ADD_SUBDIRECTORY(tests)
